package com.hnguigu.health.houduan.zw.controller_zw;

import com.hnguigu.health.houduan.zw.service_zw.zwimple;
import com.hnguigu.health.pojo.TUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("ch")
@CrossOrigin
public class zws {
    @Autowired(required = false)
    zwimple s;
    @PostMapping
    public TUser km(@RequestBody Map<String,String> qq){
        String username = qq.get("username");
        String pwd = qq.get("pwd");
        System.out.println("确实是"+username+"不确实是"+pwd);
        TUser tu = new TUser();
        tu.setUsername(username);
        tu.setPassword(pwd);
        TUser tuu = s.tuu(tu);
        return  tuu;
    }
}
